﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GalaSoft.MvvmLight;

namespace UI.ViewModel
{
 public  class CarViewModel:ViewModelBase
    {
        public CarViewModel()
        {
           

            ListCar = new List<Model.OwnerCar>();
           // LoadData();
        }

        PmsApi api = new PmsApi();

        public async void LoadData()
        {
            var req = new RestSharp.RestRequest("car", RestSharp.Method.GET);

            var resp = await api.GetList<Model.OwnerCar>(req);
            ListCar = resp;
        }
        public List<Model.OwnerCar> ListCar { get; set; }



        public Model.OwnerCar CurrCar { get; set; }


        public bool IsEditCar { get; set; }
    }
}
